// import { List } from 'echarts'
import Mock from 'mockjs'


//图表数据
let List=[];
export default{
    getStatisticalData:()=>{
        //随机产生数
        for(let i=0;i<7;i++){
            List.push(
                Mock.mock({
                    苹果:Mock.Random.float(100,8000,0,0),
                    vivo:Mock.Random.float(100,8000,0,0),
                    oppo:Mock.Random.float(100,8000,0,0),
                    魅族:Mock.Random.float(100,8000,0,0),
                    三星:Mock.Random.float(100,8000,0,0),
                    小米:Mock.Random.float(100,8000,0,0)
                })
            )
        }
  
        return{
            code:20000,
            data:{
             //饼图
             videoData:[
                {
                    name:'小米',
                    value:2999
                },
                {
                    name:'苹果',
                    value:2999
                },
                {
                    name:'vivo',
                    value:2999
                },
                {
                    name:'oppo',
                    value:2999
                },
                {
                    name:'魅族',
                    value:2999
                },
                {
                    name:'三星',
                    value:2999
                }
             ],
             //柱形图
             userData:[
                {
                    date:'周一',
                    new:10,
                    active:400
                },
                {
                    date:'周二',
                    new:10,
                    active:500
                },
                {
                    date:'周三',
                    new:12,
                    active:550
                },
                {
                    date:'周四',
                    new:60,
                    active:800
                },
                {
                    date:'周五',
                    new:65,
                    active:550
                },
                {
                    date:'周六',
                    new:53,
                    active:770
                },
                {
                    date:'周日',
                    new:33,
                    active:170
                },
             ],
             //折线图
             orderData:{
                date:['20230101','20230102','20230103','20230104','20230105','20230106','20230107',],
                data:List
             },
             tableData:[
                {
                    name:'oppo',
                    todayBuy:500,
                    monthBuy:3500,
                    totalBuy:22000
                },
                {
                    name:'vivo',
                    todayBuy:400,
                    monthBuy:3000,
                    totalBuy:20000
                },
                {
                    name:'苹果',
                    todayBuy:510,
                    monthBuy:3600,
                    totalBuy:25000
                },
                {
                    name:'小米',
                    todayBuy:400,
                    monthBuy:3000,
                    totalBuy:29000
                },
                {
                    name:'三星',
                    todayBuy:800,
                    monthBuy:3000,
                    totalBuy:21000
                },
                {
                    name:'魅族',
                    todayBuy:550,
                    monthBuy:3700,
                    totalBuy:26000
                },
             ]
            }
        }
    }
}